#include <iostream>
#include "factorymethod.h"
#include "shape.h"

using namespace std;

IFactory::IFactory()
{
    cout << "IFactory" << endl;
}

IFactory::~IFactory()
{
    cout << "~IFactory" << endl;
}

SquareFactory::SquareFactory()
{
    cout << "SquareFactory" << endl;
}

SquareFactory::~SquareFactory()
{
    cout << "~SquareFactory" << endl;
}

Shape* SquareFactory::Draw()
{
    return new Square;
}

void SquareFactory::Erase(Shape *shape)
{
    delete shape;
}


CircleFactory::CircleFactory()
{
    cout << "CircleFactory" << endl;
}

CircleFactory:: ~CircleFactory()
{
    cout << "~CircleFactory" << endl;
}

Shape* CircleFactory::Draw()
{
    return new Circle;
}

void CircleFactory::Erase(Shape *shape)
{
    delete shape;
}



